<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=UTF-8" %>
<div class="userform" id="userform_basic">
	<!-- 隐藏域保存订单手机信息 ,后台传过来是一个json字符串，value使用双引号包起来会有问题，所以暂时先用单引号处理-->
    <input type="hidden" name="ophone" id="ophone" value='${userInfo.orderPhone }'/>
    <h3 class="utitle fyh">
        <div class="utitle-text">
            <i class="icon-bind"></i>
            <span class="cur">信息绑定管理</span>
        </div>
        <div class="utitle-right" >
            <div class="nav" id="bindMgt">
                <a href="javascript:;" target="_self" class="add-phone"><i class="icon-add"></i>添加手机号</a>
                <a href="javascript:;" target="_self" class="import-order"><i class="icon-import"></i>导入订单</a>
                <a href="javascript:;" target="_self" class="bind-help"><i class="icon-help"></i>说明</a>
                <span class="uarrow down"></span>
            </div>
        </div>
    </h3>
    <ul>
        <li id="accountPhoneBind">
            <span class="label"><em>*</em> 绑定手机：</span>
            <c:choose>
				<c:when test="${null == userAccount.phone || userAccount.isPhoneValid != 1 }">
					<span class="input has-btn">
		                <input type="text" class="inputtext" autocomplete="off"  value=""  />
		                <a href="javascript:void(0)" class="submit-btn-green bind-btn-phone"><span class="rsend" style="display:none;">重发<em>120</em></span><span class="fore">绑定</span><span class="back">处理中...</span></a>
		            </span>
				</c:when>
				<c:otherwise>
	                 <span class="input has-btn">
			                <span class="inputtext">${userAccount.phone }</span>
			                <a href="javascript:void(0)" class="submit-btn-green unbind-btn-phone"><span class="rsend" style="display:none;">重发<em>120</em></span><span class="fore">解绑</span><span class="back">处理中...</span></a>
			          </span>
				</c:otherwise>
			</c:choose>
        </li>
        <li id="emailBind">
            <span class="label"><em>*</em> 绑定邮箱：</span>
            <c:choose>
  				<c:when test="${0 == userAccount.isEmailValid || '' == userAccount.email}">
   					<span class="input has-btn">
		                <input type="text" class="inputtext" autocomplete="off" value="" />
		                <a href="javascript:void(0)" class="submit-btn-green bind-btn-mail"><span class="fore">绑定</span><span class="back">处理中...</span></a>
		            </span>
  				</c:when>
  				<c:otherwise>
	  					<span class="input has-btn">
		   					<span class="inputtext">${userAccount.email }</span>
		   					<a href="javascript:void(0)" class="submit-btn-green unbind-btn-mail"><span class="fore">解绑</span><span class="back">处理中...</span></a>
	   					</span>
  				</c:otherwise>
 		    </c:choose>
        </li>
    </ul>
    <ul class="bind-list" id="bind_list">
        <c:set var="phoneCount" value="10" />
        <c:set var="cnt" value="${fn:length(userInfo.orderPhones) }"/>
        <c:forEach items="${userInfo.orderPhones }" var="orderPhone">
        	<li>
        		<span class="label"></span>
        		<span class="input has-btn">
  					<span class="inputtext">${orderPhone.phone }</span>
  					<a href="javascript:void(0)" class="submit-btn-green unbind-btn-phone"><span class="rsend" style="display:none;">重发<em>120</em></span><span class="fore">解绑</span><span class="back">处理中...</span></a>
 				 </span>
	         </li>
        </c:forEach>
    </ul>
</div>